#pragma once
#include "CDependencyObject.h"
#include "XamlQualifiedObject.h"

class CStoryboard;
class CTemplateContent;

class CVisualState :
	public CDependencyObject
{

protected: 
	CVisualState();
protected: 
	CVisualState(CCoreServices * pCore);
protected: 
	virtual ~CVisualState();
private: 
	void Initialize();
public: 
	static HRESULT Create(CDependencyObject * * ppObject, CREATEPARAMETERS * pCreate);
	virtual CDependencyObject * GetNamescopeParent();
	void SetTemporaryNamescopeParent(CDependencyObject * pTemporaryNamescopeParent);
	virtual HRESULT SetTemplatedParent(CDependencyObject * pDO);
	virtual XUINT32 GetTypeIndex() const;
	HRESULT GetStoryboard(CStoryboard * * ppStoryboard);
	static HRESULT Storyboard(struct Xcp_IDependencyObject * pObject, XUINT32 cArgs, CValue * pArgs, CValue * pResult);
	HRESULT OnObjectCreated(const xshared_ptr<XamlQualifiedObject> & qoRoot, const xshared_ptr<XamlQualifiedObject> & qoNewInstance, CDependencyObject * pTemplatedParent);
	virtual HRESULT RegisterName(CDependencyObject * pNamescopeOwner, XBOOL bTemplateNamescope);
	CDependencyObject * m_pTemplatedparent;
	CTemplateContent * m_pDeferredStoryboard;
	CStoryboard * m_pStoryboard;
private: 
	CDependencyObject * m_pTemporaryNamescopeParent;



};